package com.yx.robot.sdk.req;

public class SetQuiteTimeParam {
    private int startHour;
    private int startMin;
    private int endHour;
    private int endMin;
    private boolean mSwitch;
    private boolean hasSetSwitch;
    private boolean hasSetTime;

    private SetQuiteTimeParam(Builder builder) {
        this.mSwitch = builder.switcher;
        this.startHour = builder.startHour;
        this.startMin = builder.startMin;
        this.endHour = builder.endHour;
        this.endMin = builder.endMin;
        this.hasSetSwitch = builder.hasSetSwitch;
        this.hasSetTime = builder.hasSetTime;
    }

    public static Builder newBuilder() {
        return new Builder();
    }

    public boolean hasSetTime() {
        return hasSetTime;
    }

    public boolean hasSetSwitch() {
        return hasSetSwitch;
    }

    public boolean ismSwitch() {
        return mSwitch;
    }

    public void setmSwitch(boolean mSwitch) {
        this.mSwitch = mSwitch;
    }

    public int getStartHour() {
        return startHour;
    }

    public void setStartHour(int startHour) {
        this.startHour = startHour;
    }

    public int getStartMin() {
        return startMin;
    }

    public void setStartMin(int startMin) {
        this.startMin = startMin;
    }

    public int getEndHour() {
        return endHour;
    }

    public void setEndHour(int endHour) {
        this.endHour = endHour;
    }

    public int getEndMin() {
        return endMin;
    }

    public void setEndMin(int endMin) {
        this.endMin = endMin;
    }

    public static final class Builder {
        boolean hasSetSwitch;
        private boolean hasSetTime;
        private boolean switcher;

        private int startHour;
        private int startMin;
        private int endHour;
        private int endMin;

        private Builder() {
        }

        public Builder setTime(int startHour, int startMin, int endHour, int endMin) {
            this.startHour = startHour;
            this.startMin = startMin;
            this.endHour = endHour;
            this.endMin = endMin;
            this.hasSetTime = true;
            return this;
        }

        public Builder setSwitch(boolean switcher) {
            this.switcher = switcher;
            this.hasSetSwitch = true;
            return this;
        }

        public SetQuiteTimeParam build() {
            return new SetQuiteTimeParam(this);
        }
    }
}
